import config from '@/utils/config'
import { generateRequest } from '@/utils/request'
const { apiUrlPrefix } = config

/** 新增部门组织架构 */
export const createOrgApi = generateRequest(`${apiUrlPrefix}/organization/department/insert`)

/** 删除部门组织架构 */
export const deleteOrgApi = generateRequest(`${apiUrlPrefix}/organization/department/delete`)

/** 修改部门组织架构 */
export const updateOrgApi = generateRequest(`${apiUrlPrefix}/organization/department/update`)

/** 查询部门组织架构树 */
export const queryOrgTreeApi = generateRequest(`${apiUrlPrefix}/organization/department/getTree`)

/** 获取所有部门 */
export const getAllDepartApi = generateRequest(`${apiUrlPrefix}/organization/department/getAllDepartmentList`)

/** 获取自定义数据 */
export const getOrganizationCustomDataListApi = generateRequest(
  `${apiUrlPrefix}/organizationCustomData/getOrganizationCustomDataList`,
)

/** 导入模板 */
export const importTemplateApi = generateRequest(`${apiUrlPrefix}/xxxx`)

// ---------------------------------------------------------------------------------------------

/** 查询人员信息列表 */
export const queryUserListApi = generateRequest(`${apiUrlPrefix}/organization/user/listByPage`)

/** 查询人员信息列表 */
export const queryUserPcsListApi = generateRequest(`${apiUrlPrefix}/organization/user/listByPagePcs`)

/** 保存人员信息 */
export const saveOrUpdateApi = generateRequest(`${apiUrlPrefix}/organization/user/saveOrUpdate`)

/** 修改个人密码 */
export const changeUserPasswordApi = generateRequest(`${apiUrlPrefix}/organization/user/changeUserPassword`)

/** 批量更改人员组织机构 */
export const batchUpdateOrgApi = generateRequest(`${apiUrlPrefix}/organization/user/batchBindDepart`)

/** 获取个人信息 */
export const queryUserInfoApi = generateRequest(`${apiUrlPrefix}/organization/user/profile`)

/** 重置密码 */
export const resetUserPasswordApi = generateRequest(`${apiUrlPrefix}/organization/user/updatePassword`)

/** 用户擅长 */
export const getUserServiceObjectListApi = generateRequest(`${apiUrlPrefix}/cts/serviceobject/getUserServiceObjectList`)
